<template>
	<view class="fl-s-c nav-pt fm-ali">
		<!-- 自定义导航栏 -->
		<view class="w-1"
			style="background-color: #f4f4f4; position: fixed; left: 0; top: 0; z-index: 99; overflow: hidden;">
			<u-navbar title="确认订单" :border-bottom="false" :background="{background:'#FFFFFF'}"></u-navbar>
			<image src="/static/images/user/bg284.png" class="w-1 absolute-0" style="height: 284rpx;"></image>
		</view>
		<view class="w-1 fl-s-s u-rela" style="background-color: #fff; ">
			<view class="fr-b-c w-1 p-r-30 m-t-30" @click="chooseAddress">
				<view class="fr-s-c" v-if="!default_address">
					<image src="/static/images/home/no_choose_address.png" style="width: 48rpx; height: 48rpx;"></image>
					<text class="c-00 fs-28 fm-ali">添加收货地址</text>
				</view>
				<view v-else class="fr-s-c">
					<image src="/static/images/home/choosed_address.png" style="width: 48rpx; height: 48rpx;"></image>
					<text
						class="c-00 fs-28 fm-ali text-line-1">{{default_address.province +default_address.city + default_address.district+ ' ' +default_address.address}}</text>
				</view>
				<image class="m-l-10" src="/static/images/user/right_arr_icon.png" style="width: 12rpx; height: 18rpx;">
				</image>
			</view>
			<image src="/static/images/home/color_bar.png" class="w-1 m-t-20" style="height: 4rpx;"></image>
			<!-- 商品信息 -->
		</view>
		<view class="w-1 m-t-20" style="background: #FFFFFF; padding: 32rpx 30rpx;">
			<view class="relative ma20" v-for="(item,index) in buyPro" :key="index">
				<view class="list-item-top" v-if="item.shop_name">
					<view class="list-item-top-title">
						{{item.shop_name}}
					</view>
				</view>
				<view class="fr-s-s margin20" v-for="(items,indexs) in item.products">
					<image :src="items.image" class="relative" mode="aspectFill" style="width: 162rpx; height: 162rpx; border-radius: 12rpx;" v-if="items.platform == 1"></image>
					<image :src="baseUrl.cdnurl+items.image" class="relative" mode="aspectFill" style="width: 162rpx; height: 162rpx; border-radius: 12rpx;" v-else></image>	
					<view class="flex-1 fl-b-s fm-ali m-l-20">
						<text class="text-line-1 c-00 fs-26">{{items.name}}</text>
						<view class="guige">
							<view>
								【已选】
								<text v-for="(itemz, skey) in items.sku.difference" :key="skey">
								{{ itemz }},
								</text>
								数量:{{items.number}}
							</view>
						</view>
						<view class="fr-b-c w-1 margin20">
							<view class="fr-s-c fm-ali" style="color: #FA360A; align-items: baseline;">
								<text class="fs-22">￥</text>
								<text class="fs-36">{{items.sku.price}}</text>
							</view>
							<u-number-box :disabledInput="true" :min="1" :max="Number(items.sku.stock)"  v-model="items.number" @change="valChange($event,items.sku.price)"></u-number-box>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="jiuwudi" v-if="OldStuff_list.length == 0 && old_img.length == 0">
			<view class="jiuwudi_left">
				旧件抵或非平台旧件抵
			</view>
			<view class="jiuwudi_right" @tap="go_choose_jiuwu">
				<text class="text-green">选择旧物抵扣</text> <u-icon name="arrow-right" class="jiuwudi_right_icon"></u-icon>
			</view>
		</view>
		<view class="jiuwu-list" v-if="OldStuff_list.length > 0">
			<view class="jiuwu-list-top">
				<view class="jiuwudi_left">
					已选旧物
				</view>
				<view class="jiuwudi_right" @tap="go_choose_jiuwu">
					修改<u-icon name="arrow-right" class="jiuwudi_right_icon"></u-icon>
				</view>
			</view>
			<view class="jiuwu-list-view">
				<view class="jiuwu-list-view-item" v-for="(item,index) in OldStuff_list" :key="index">
					<view class="jiuwu-list-view-item-top">
						<view class="jiuwu-list-view-item-top-left">
							{{item.order_no}}
						</view>
						<view class="jiuwu-list-view-item-top-right">
							{{item.createtime_text}}
						</view>
					</view>
					<view class="jiuwu-list-view-item-min">
						<image :src="item.image" class="jiuwu-list-view-item-min-left" mode="" v-if="item.platform == 1"></image>
						<image :src="baseUrl.cdnurl+item.image" class="jiuwu-list-view-item-min-left" mode="" v-else></image>
						<view class="jiuwu-list-view-item-min-right">
							<view class="jiuwu-list-view-item-min-right-top text-line-1">
								{{item.title}}
							</view>
							<view class="jiuwu-list-view-item-min-right-bottom">
								还能卖¥ <text
									class="jiuwu-list-view-item-min-right-bottom-num">{{item.price}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="jiuwu-list" v-if="old_img.length >0">
			<view class="jiuwu-list-top">
				<view class="jiuwudi_left">
					已选旧物
				</view>
				<view class="jiuwudi_right" @tap="go_choose_jiuwu">
					修改<u-icon name="arrow-right" class="jiuwudi_right_icon"></u-icon>
				</view>
			</view>
			<view class="jiuwu-list-view">
				<view class="jiuwu-list-view-item" >
					<view class="jiuwu-list-view-item-min">
						<image :src="item" class="jiuwu-list-view-item-min-left" mode="" v-for="(item,index) in old_img"></image>
					</view>
				</view>
			</view>
		</view>
		<view class="shangjiainfo" v-if="(OldStuff_list.length > 0 || old_img.length > 0) && parseFloat(z_new_price) > 50">
			<view class="shangjiainfo_danhao">
				<view class="shangjiainfo_danhao_left">
					<text class="bitian">*</text>物流单号
				</view>
				<input type="text" class="shangjiainfo_danhao_right" placeholder="请输入" v-model="LogisticsNum">
			</view>
			<view class="shangjiainfo_bottom">
				<view class="shangjiainfo_bottom_title">
					旧件回寄地址
				</view>
				<view class="">
					<view class="flex" >
						<view class="shangjiainfo_bottom_addscce">
							{{buyback.address}} {{buyback.username}} {{buyback.mobile}}
						</view>
						<view class="shangjiainfo_bottom_flex_right" @tap="fuzhi(buyback.address+' '+buyback.username+' '+buyback.mobile)">
							复制
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="faren" style="padding: 36rpx 30rpx"  v-if="OldStuff_list.length > 0 && old_img.length == 0 && parseFloat(z_new_price) > 50">
			<text class="left-t faren_title">
				上传旧物图片
				<text style="color: #f64949">*</text>
			</text>
			<view class="faren_flex">
				<view class="faren_flex_item" v-for="(item, index) in QualificationsImgList">
					<view class="choose_img" @tap="chooseImage">
						<image :src="item" class="choose_img_view" mode=""></image>
					</view>
					<u-icon name="close-circle-fill" class="close-circle-fill" @tap="close_img(index)"></u-icon>
				</view>
				<view class="faren_flex_item">
					<view class="choose_img" @tap="chooseImage">
						<image src="/static/images/user/xiangji.png" class="choose_img_icon" mode=""></image>
						<view class="choose_img_desc">点击拍照/上传</view>
					</view>
				</view>
			</view>
			<view class="faren_flex_right">可上传多图</view>
		</view>
		<view class="w-1 m-t-20" style="background: #FFFFFF; padding: 32rpx 30rpx;">
			<view class="fr-b-c" style="height: 92rpx; margin-top: 28rpx;">
				<text class="fs-26" style="color: #888888;">赠送积分</text>
				<text class="fs-26 c-33">{{integral}}</text>
			</view>
			<view v-if="OldStuff_list.length == 0 && old_img.length == 0">
				<!-- 优惠 积分 运费  -->
				<view class="fr-b-c" @click="toCoupon" style="height: 92rpx; margin-top: 28rpx;" >
					<text class="fs-26" style="color: #888888;">优惠券</text>
					<view class="fr-s-c">
						<view class="cou-item fr-c relative" v-if="couponinfo">
							<image src="/static/images/home/goods_detail_cou_bg.png" style="left: 0; top: 0;"
								class="absolute w-1 h-1"></image>
							<text class="relative">满{{couponinfo.limit}}减{{couponinfo.price}}</text>
						</view>
						<image class="m-l-20" src="/static/images/user/right_arr_icon.png"
							style="width: 12rpx; height: 18rpx;">
					</view>
				</view>
				<view class="fr-b-c" style="height: 92rpx; margin-top: 28rpx;">
					<text class="fs-26" style="color: #888888;">是否实体店购买</text>
					<view class="cou-item fr-c">
						<text class="fs-26" style="color: #333;" v-if="!checked1">
							否
						</text>
						<text class="fs-26" style="color: #FA360A;" v-else>
							是
						</text>
						<u-switch  class="m-l-20" size="30" active-color="#FA360A" v-model="checked1" ></u-switch>
					</view>
				</view>
				<view class="fr-b-c" @click="toStore" style="height: 92rpx; margin-top: 28rpx;" v-if="checked1">
					<text class="fs-26" style="color: red;">实体门店</text>
					<view class="fr-s-c">
						<view class="cou-item fr-c relative" v-if="storeinfo">
							<image src="/static/images/home/goods_detail_cou_bg.png" style="left: 0; top: 0;"
								class="absolute w-1 h-1"></image>
							<text class="relative">{{ storeinfo.shopname}}</text>
						</view>
						<image class="m-l-20" src="/static/images/user/right_arr_icon.png"
							style="width: 12rpx; height: 18rpx;">
					</view>
				</view>
				<view class="fr-b-c" @click="go_fapiao" style="height: 92rpx; margin-top: 28rpx;">
					<text class="fs-26" style="color: #888888;">发票抵扣</text>
					<view class="fr-s-c">
						<view class="cou-item fr-c relative">
							
							<text class="relative" v-if="fapiao_obj">发票金额¥{{fapiao_obj.price}}</text>
						</view>
						<image class="m-l-20" src="/static/images/user/right_arr_icon.png"
							style="width: 12rpx; height: 18rpx;">
					</view>
					
				</view>
				<view class="fr-b-c" style="height: 92rpx; margin-top: 28rpx;">
					<text class="fs-26" style="color: #888888;">使用积分抵扣</text>
					<view class="cou-item fr-c">
						<text class="fs-26" style="color: #FA360A;"
							v-if="checked && pointsinfo">使用{{pointsinfo.score}}积分，抵扣￥{{pointsinfo.price}}</text>
						<u-switch  class="m-l-20" size="30" active-color="#FA360A" v-model="checked"></u-switch>
					</view>
				</view>
			</view>
			
			
			<view class="fr-b-c" style="height: 92rpx; margin-top: 28rpx;">
				<text class="fs-26" style="color: #888888;">快递费</text>
				<text class="fs-26 c-33">￥{{all_freight_price}}</text>
			</view>
			<view class="fr-s-c" style="height: 92rpx; margin-top: 28rpx;">
				<text class="fs-26" style="color: #888888;">备注</text>
				<input type="text" class="flex-1 fs-26" v-model="user_remark" style="margin-left: 50rpx;"
					placeholder="请输入备注信息">
			</view>
			<view class="w-1 fr-e-e" style="align-items: baseline; margin-top: 36rpx;">
				<text class="fs-26" style="color: #888888;">小计：</text>
				<view class="fr-s-c fm-ali" style="color: #FA360A; align-items: baseline;">
					<text class="fs-26">￥</text>
					<text class="" style="font-size: 44rpx;">{{pay_money | pointsPrice}}</text>
					<text class="fs-26">.{{pay_money | pointsPrice(1)}}</text>
				</view>
			</view>
			<view class="w-1 fr-e-e" style="align-items: baseline; margin-top:6rpx;" v-if="couponinfo">
				<text class="fs-26" style="color: #3DC05A;">优惠券抵扣¥{{couponinfo.price}}</text>
			</view>
		</view>
		<view class="iphonex" style="background: #FFFFFF;">
			<view class="w-1 fr-b-c p-r-30" style="height: 104rpx;">
				<view class="fr-s-c fm-ali">
					<text class="c-66 fs-24">合计</text>
					<view class="fr-s-c fm-ali" style="color: #FA360A; align-items: baseline;">
						<text class="fs-24">￥</text>
						<text class="fs-36">{{pay_money | pointsPrice}}</text>
						<text class="fs-20">.{{pay_money | pointsPrice(1)}}</text>
					</view>
				</view>
				<view class="fr-c">
					<view class="buy-btn fr-c" @click="clickSuborder">提交订单</view>
				</view>
			</view>
		</view>

		<u-popup closeable bgColor="transparent" border-radius="24" v-model="show" mode="bottom">
			<view class="fl-s-c relative w-1" style="padding: 28rpx 32rpx; background: #FFFFFF; border-radius: 24rpx;">
				<text class="c-00 fs-32" style="margin-top: 110rpx; margin-bottom: 80rpx;">支付方式</text>
				<view class="w-1 fr-b-c reason-item" v-for="(item,index) in payTypes" :key="index"
					@click="changeReason(item,index)">
					<view class="fr-s-c">
						<image :src="item.img" class="circle" style="width: 48rpx; height: 48rpx;"></image>
						<view class="m-l-20">
						{{item.name}}
						<view class="yue" v-if="item.type == 'balance'">
							可用余额：{{yu_e}}
						</view>
						</view>
					</view>
					<image
						:src="index==reasonIndex?'/static/images/shopcar/color_selected.png':'/static/images/shopcar/noc_not_select.png'"
						style="width: 36rpx; height: 36rpx;"></image>
				</view>
				<view class="sure-btn fr-c" @click="subOrder">确定</view>
			</view>
		</u-popup>

		<!-- 取消支付 -->
		<u-popup v-model="priceShow" mode="center" border-radius="14">
			<view class="quxiao">
				<view class="quxiao_title">
					确认离开收银台
				</view>
				<view class="quxiao_content">
					您的订单在2小时内未支付将被取消，要重新支付本次订单，请在“我的”页面，“待付款”中找到该订单进行支付
				</view>
				<view class="quxiao_content_flex">
					<view class="quxiao_content_flex_left quxiao_btn" @tap="go_back">
						确认离开
					</view>
					<view class="quxiao_content_flex_right quxiao_btn" @tap="jixu">
						继续支付
					</view>
				</view>
			</view>
		</u-popup>
		
		<u-popup v-model="tiaodong" mode="center" border-radius="14">
			<view class="quxiao1">
				<view class="quxiao_content1 animated11 rubberBand11">
					购买的物品不再使用，可原价回购
				</view>
				<view class="quxiao_content_flex">
					<view class="quxiao_content_flex_left quxiao_btn" @tap="zhifu_jx(1)">
						返回
					</view>
					<view class="quxiao_content_flex_right quxiao_btn" @tap="zhifu_jx(2)">
						继续支付
					</view>
				</view>
			</view>
		</u-popup>
		<u-popup v-model="last_popup" mode="center" border-radius="14">
			<view class="quxiao1">
				
				<view class="quxiao_content1 animated11 rubberBand11">
					回购参考商品详情
				</view>
				<view class="quxiao_content_flex1 " @tap="go_dingdan">
					知道了
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	import {
		pointsPrice
	} from '@/utils/util.js'
	import config from '@/utils/base.js';
	export default {
		data() {
			return {
				value: 1,
				checked: false,
				checked1:false,
				storeinfo:'',
				show: false,
				tiaodong:false,
				payTypes: [{
						text: '余额支付',
						type:'balance',
						img: '/static/images/home/balance_pay_icon.png'
					},
					{
						text: '微信支付',
						type:'wechat',
						img: '/static/images/user/we_icon.png'
					},
					{
						text: '支付宝支付',
						type:'alipay',
						img: '/static/images/user/ali_icon.png'
					}
					//,
					// {
					// 	text: '银联',
					// 	type:'apple',
					// 	img: '/static/images/home/yinlian.png'
					// },
				],
				reasonIndex: 0,
				buydata: [], // 获取页面数据的参数
				buyPro: [], // 接口返回页面数据
				ids: '', // 传给优惠券的商品id集
				total_price: 0, //接口返回总金额
				default_address: '', // 默认地址信息
				pointsinfo: '', // 积分抵扣金额详情
				couponinfo: '',//优惠券
				// all_freight_price: 0, // 运费
				total_num: 0,
				user_remark: '', // 备注
				flag: false, // false 可以返回上一页 true 不可以
				priceShow: false,
				more_pay: '', // 满的金额
				discount: '', // 减少的金额
				is_combination: false, // 是否使用组合支付
				OldStuff_list: [],
				LogisticsNum: '',
				danjia: '',
				likai: true,
				token:'',
				token1:'',
				orderData:'',
				baseUrl:config,
				couponData: {},
				cartType:'',
				order_list:'',
				price:'0.00',
				payNum: 1,
				order_pay_no: '',
				order_no:'',
				order_type:'',
				yu_e:'',
				isnocondition:true,
				goodsact:'',
				// addressData:'',\
				last_popup:false,
				platform:0,
				old_img:[],
				QualificationsImgList:[],
				checked2:false,
				invoice:'',
				buyback:'',
				fapiao_obj:''
			}
		},
		onLoad(option) {
			// console.log(option)
			this.platform = option.platform || 0
			if(option.goodsact){
				this.goodsact = JSON.parse(option.goodsact) 
			}
			
			this.$api.post({
				url: '/wanlshop/pay/getBalance',
				success: res => {
					console.log(res)
					this.yu_e = res.data
					this.$store.commit('user/setUserInfo', {money: res});
					// 获取支付列表
					this.getPayment();
				}
			});
			this.optionData = JSON.parse(option.data);
			console.log(this.optionData)
			this.loadData();
			this.cartType = option.type;
			
		},
		onUnload() {  
		    // 移除监听事件  
			uni.$off('jiuwulist');  
			uni.$off('imageList');  
			uni.$off('onCoupon');
			uni.$off('fapiao'); 
			uni.$off('onStore');
		},
		mounted() {
			uni.$on('jiuwulist', (res) => {
				this.old_img = [] //旧物照片
				this.pointsinfo = '', // 积分抵扣金额详情
				this.couponinfo ='',//优惠券
				this.checked = false 
				this.checked1 = false
				this.checked2 = false
				this.fapiao_obj = ''
				this.OldStuff_list = res
				console.log(this.OldStuff_list)
				let num = 0;
				for(let item of this.OldStuff_list){
					num += parseFloat(item.price) 
				}
				let mulriple = uni.getStorageSync('mulriple')
				let num_new = 0;
				
				for(let i in this.buyPro){
					for(let k in this.buyPro[i].products){
						let num_d = Number(this.buyPro[i].products[k].sku.price)* parseInt(this.buyPro[i].products[k].number)  
						num_new += num_d
					}
				}
				let right_price = Number(num)*Number(mulriple)
				if(num_new <= right_price.toFixed(2)){
					this.isnocondition = false
					setTimeout(()=>{
						uni.showToast({
							title:'选择商品必须大于2.2倍！',
							icon:'none'
						})
					},100)
				}
			})
			uni.$on('imageList',res=>{
				console.log(res)
				this.OldStuff_list = [] //选择的旧物
				this.pointsinfo = '', // 积分抵扣金额详情
				this.couponinfo ='',//优惠券
				this.checked = false 
				this.checked1 = false
				this.checked2 = false
				this.fapiao_obj = ''
				this.old_img = res
				
			})
			uni.$on('onCoupon',coupon => {
				// console.log(coupon)
				this.pointsinfo = '', // 积分抵扣金额详情
				this.old_img = []
				this.OldStuff_list = [] //选择的旧物
				this.couponinfo = coupon
				this.checked = false 
				this.checked1 = false
				this.checked2 = false
				this.fapiao_obj = ''
			})
			uni.$on('onStore', store => {
				
				
				this.pointsinfo = '', // 积分抵扣金额详情
				this.old_img = []
				this.OldStuff_list = [] //选择的旧物
				this.storeinfo = store
				// this.checked1 = false
				this.checked2 = false
				this.fapiao_obj = ''
			})
			uni.$on('fapiao',fapiao=>{ 
				// this.isnocondition = false
				// console.log(fapiao)
				this.fapiao_obj = fapiao
				this.pointsinfo = ''
				this.couponinfo = ''
				this.OldStuff_list = [] //选择的旧物
				this.old_img = [] //旧物照片
				this.checked = false
				this.checked1 = false
				this.checked2 = false
				let fapio_price = Number(fapiao.price)
				let mulriple = uni.getStorageSync('mulriple')
				let num_new = 0;
				for(let i in this.buyPro){
					for(let k in this.buyPro[i].products){
						let num_d = Number(this.buyPro[i].products[k].sku.price)* parseInt(this.buyPro[i].products[k].number)  
						num_new += num_d
					}
				}
				let timer = null
				let right_price = Number(fapio_price)*Number(mulriple)
				if(num_new <= right_price.toFixed(2)){
					this.isnocondition = false
					clearTimeout(timer)
					timer = setTimeout(()=>{
						uni.showToast({
							title:'选择商品必须大于2.2倍！',
							icon:'none',
							duration:5000
						})
					},100)
				}
			})
		},
		filters: {
			pointsPrice
		},
		watch: {
			isnocondition(val){
				console.log(val)
			},
			checked2(val){
				if(val){
					this.pointsinfo = ''
					this.couponinfo = ''
					this.OldStuff_list = [] //选择的旧物
					this.old_img = [] //旧物照片
					this.checked = false
					this.checked1 = false
					this.fapiao_obj = ''
				}
			},
			checked(val) {
				let arr = []
				if(this.orderData.lists.length >0){
					for(let item of  this.orderData.lists){
						for(let items of item.products){
							let data = {
								gid:items.shop_id,
								buy_pirce:items.sku.price,
								buy_nums:items.number
							}
							arr.push(data)
						}
					}
				}
				if (val) {
					this.$post({
						url: '/wanlshop/Tickets/get_use_scord',
						data: {
							buys:arr
						}
					}).then(res => {
						console.log(res)
						this.pointsinfo = res.data
						this.couponinfo = ''
						this.OldStuff_list = [] //选择的旧物
						this.old_img = [] //旧物照片
						this.checked1 = false
						this.checked2 = false
						this.fapiao_obj = ''
					})
				} else {
					this.pointsinfo = '' // 取消使用积分 将积分信息置空
				}
			},
			checked1(vale){
				if(vale){
					this.pointsinfo = '', // 积分抵扣金额详情
					this.old_img = []
					this.OldStuff_list = [] //选择的旧物
					this.couponinfo = ''
					this.checked = false 
					this.checked2 = false
					this.fapiao_obj = ''
				} else {
					this.storeinfo = ''
				}
			}
			// default_address: {
			// 	deep: true, //true为进行深度监听,false为不进行深度监听
			// 	handler(val) {
			// 		console.log(val, '收货地址');
			// 		// this.getFees()
			// 	}
			// },
			// couponinfo: { 
			// 	deep: true,
			// 	handler(val) {
			// 		console.log(val, '优惠券');
			// 	}
			// }
		},
		computed: {
			all_freight_price(){
				let num = 0;
				for(let i in this.buyPro){
					for(let k in this.buyPro[i].products){
						if(this.buyPro[i].products[k].freight.length == 0){
							num = 0
							return 0
						}else{
							if(this.buyPro[i].products[k].freight){
								num += Number(this.buyPro[i].products[k].freight.price) 
							}else{
								num = 0
							}
						}
					}
				}
				return num
			},
			// 需要支付的金额数量
			pay_money() {
				let mulriple = uni.getStorageSync('mulriple')
				let num_new = 0
				for(let i in this.buyPro){
					for(let k in this.buyPro[i].products){
						let num_d = Number(this.buyPro[i].products[k].sku.price)* Number(this.buyPro[i].products[k].number) 
						num_new += num_d
					}
				}
				let fapiao = 0 //发票
				let old_num = 0 // 旧物
				let pointsinfo_price = 0 //积分
				let couponinfo_price = 0 //优惠券
				
				//发票
				if(this.fapiao_obj){
					fapiao = Number(this.fapiao_obj.price) 
					let pay_money = num_new - fapiao + this.all_freight_price
					if(num_new <= fapiao.toFixed(2)* Number(mulriple)){
						this.isnocondition = false
					}else{
						this.isnocondition = true
					}
					return pay_money.toFixed(2)
				}
				// 旧物
				if(this.OldStuff_list.length > 0){
					for(let k of this.OldStuff_list){
						old_num+=parseFloat(k.price) 
					}
					let pay_money = num_new - old_num + this.all_freight_price
					let old_price = Number(old_num)*Number(mulriple)
					
					console.log(num_new)
					console.log(old_price)
					if(num_new <= old_price.toFixed(2)){
						this.isnocondition = false
					}else{
						this.isnocondition = true
					}
					return pay_money.toFixed(2)
				}
				
				if(this.pointsinfo){
					pointsinfo_price = parseFloat(this.pointsinfo.price)
					if(num_new - pointsinfo_price <=  0.01){
						let pay_money = 0.01 + Number(this.all_freight_price) 
						return pay_money.toFixed(2)
					}else{
						let pay_money = num_new - pointsinfo_price + this.all_freight_price
						return pay_money.toFixed(2)
					}
					
				}
				if(this.couponinfo){
					couponinfo_price = parseFloat(this.couponinfo.price)
					let pay_money = num_new - couponinfo_price + this.all_freight_price
					return pay_money.toFixed(2)
				}
				//全款 
				let pay_money_num = Number(num_new) + Number(this.all_freight_price) 
				return pay_money_num.toFixed(2)
				
				
				// if(this.OldStuff_list.length > 0){
				// 	for(let k of this.OldStuff_list){
				// 		old_num+=parseFloat(k.price) 
				// 	}
				// }
				// if(this.pointsinfo){
				// 	pointsinfo_price = parseFloat(this.pointsinfo.price)
				// }
				// if(this.couponinfo){
				// 	couponinfo_price = parseFloat(this.couponinfo.price)
				// }
				// let all = num+this.all_freight_price -old_num-pointsinfo_price-couponinfo_price
				// for(let item of this.OldStuff_list){
				// 	num_dos += parseFloat(item.price) 
				// }
				// let old_price = Number(num_dos)*Number(mulriple)
				// if(num_new <= old_price.toFixed(2)){
				// 	this.isnocondition = false
				// }else{
				// 	this.isnocondition = true
				// }
				// let price = num+this.all_freight_price -old_num-pointsinfo_price-couponinfo_price-fapiao
				// return price.toFixed(2)
				
			},
			z_new_price(){
				let num = 0
				if(this.buyPro.length == 0){
					return num
				}else{
					for(let item of this.buyPro){
						for(let item1 of item.products){
							num += parseFloat(item1.sku.price) 
						}
					}
					return num
				}
				
			},
			integral(){
				let num = 0
				for(let item of this.buyPro){
					for(let item2 of item.products){
						num += parseInt(item2.integral) 
					}
				}
				return num
			}
		},
		onShow() {
			this.token = uni.getStorageSync('wanlshop:user').token
			this.tiaodong = false
		},

		onBackPress() {
			if (this.likai) {
				this.priceShow = true
				return true
			} else {
				return false
			}
		},
		methods: {
			go_fapiao(){
				uni.navigateTo({
					url:'/pages/Home/fapiao/fapiao'
				})
			},
			close_img(index) {
				this.QualificationsImgList.splice(index, 1);
			},
			async chooseImage() {
				//#ifdef APP-PLUS
				let result = await this.$store.dispatch("quanxian/requestPermissions",'WRITE_EXTERNAL_STORAGE')
					console.log(result)
				if (result !== 1) return
				this.$store.state.isCAMERA = true
				// #endif
				
				let t = this;
				uni.chooseImage({
					count: 1, //默认9
					success: (res) => {
						console.log(res);
						t.uploadImg(res.tempFilePaths[0]);
					}
				});
			},
			uploadImg(path) {
				let that = this;
				// 上传图片
				that.$api.get({
					url: '/wanlshop/common/uploadData',
					success: (updata) => {
						console.log(updata);
						console.log(updata.data.uploadurl);
						uni.uploadFile({
							url: updata.data.uploadurl, //仅为示例，非真实的接口地址
							filePath: path,
							name: 'file',
							header: {
								token: uni.getStorageSync('wanlshop:user').token || ''
							},
							formData: updata.data.storage == 'local' ? null : updata.data.multipart,
							success: (res) => {
								console.log(res.data);
								let resinfo = JSON.parse(res.data);
								that.QualificationsImgList.push(resinfo.data.fullurl);
								console.log(that.QualificationsImgList);
							}
						});
					}
				});
			},
			fuzhi(text){
				uni.setClipboardData({
					data:text,
					success() {
						uni.showToast({
							title:'复制成功',
							icon:'none'
						})
					}
				})
			},
			getPayment(){
				let method = 'wap';
				// #ifdef APP-PLUS
				method = 'app';
				// #endif
				// #ifdef MP-BAIDU
				method = 'mini';
				// #endif
				// #ifdef MP-WEIXIN
				method = 'miniapp';
				// #endif
				// #ifdef MP-ALIPAY
				method = 'mini';
				// #endif
				// #ifdef MP-QQ
				method = 'mini';
				// #endif
				this.payTypes = [{
					name: '余额支付',
					describe: '',
					type: 'balance',
					method: 'balance',
					state: this.isbalance ? true: false, // 是否可用
					select: this.isbalance ? true: false, // 是否选中
					img: '/static/images/home/balance_pay_icon.png'
				}];
				// #ifdef H5
				if(this.$jssdk.isWechat()){
					this.payTypes.push({
						name: '公众号支付',
						describe: '推荐使用公众号支付',
						type: 'wechat',
						method: 'mp',
						state: true,
						select: this.isbalance ? false : true
					});
				}else{
					this.payTypes.push({
						name: '支付宝',
						describe: '',
						type: 'alipay',
						method: method,
						state: true,
						select: false,
						img: '/static/images/user/ali_icon.png'
					}
					,
					{
						name: '微信支付',
						describe: '推荐使用微信支付',
						type: 'wechat',
						method: method,
						state: true,
						select: this.isbalance ? false : true,
						img: '/static/images/user/we_icon.png'
					},
					);
				}
				// #endif
				// #ifndef H5
				uni.getProvider({
				    service: "payment",
				    success: (e) => {
				        e.provider.map((value) => {
							if (value == 'alipay') {
								this.payTypes.push({name: '支付宝',img: '/static/images/user/ali_icon.png',describe: '',type: value,method: method,state: true,select: false});
							}
							else if(value == 'wxpay'){
								this.payTypes.push({name: '微信支付',img: '/static/images/user/we_icon.png',describe: '推荐使用微信支付',type: 'wechat',method: method,state: true,select: this.isbalance ? false : true});
							}/* else if(value == 'baidu'){ */
							// 	this.payTypes.push({name: '百度收银台',describe: '',type: value,method: method,state: true,select: false});
							// }else if(value == 'appleiap'){
							// 	this.payTypes.push({name: 'Apple支付',describe: '',type: 'apple',method: method,state: true,select: false});
							// }
				        })
						console.log(this.payTypes)
				    }
				});
				// #endif
				console.log(this.payTypes)
			},
			async loadData(address_id) {
				// console.log('-----')
				this.$api.post({
					url: '/wanlshop/order/getOrderGoodsList',
					loadingTip: '加载中',
					data: {
						data: this.optionData,
						// platform:this.platform,
						address_id: address_id
					},
					success: res => {
						console.log(res)
						this.buyback = res.data.buyback
						this.token1 = res.data.token;
						this.orderData = res.data.orderData;
						if (res.data.addressData) {
							this.default_address = res.data.addressData;
						}
						this.invoice = res.data.invoice;
						this.buyPro = res.data.orderData.lists
						console.log(this.default_address)
					}
				});
			},
			//添加或修改成功之后回调
			async refreshList(data, type) {
				this.$api.post({
					url: '/wanlshop/address/address',
					data: {
						data: data,
						type: 'add'
					},
					success: res => {
						this.addressData = res;
					}
				});
			},
			addAddress(type) {
				this.$wanlshop.to(`pages/UserCenter/MyAddress/MyAddress`);
			},
			go_back() {
				this.likai = false
				uni.navigateBack()
			},
			jixu() {
				this.priceShow = false
			},
			go_choose_jiuwu() {
				uni.navigateTo({
					url: '/pages/Home/GoodsDetail/ChooseOldStuff/ChooseOldStuff'
				})
			},
			payContinue() {
				this.priceShow = false
				if (this.is_combination) {
					this.reasonIndex = this.reasonIndex == 0 ? 1 : this.reasonIndex
				}
				this.show = true
			},
			// 点击提交订单按钮
			clickSuborder() {
				if (this.checked1 && !this.storeinfo) return this.$u.toast('请选择实体门店');
				if(this.old_img.length > 0){
					
					if(this.z_new_price > 50){
						if(this.LogisticsNum == ''){
							uni.showToast({
								title:'请填写物流单号',
								icon:'none'
							})
							return false
						}
					}
					
					this.tj_order()
					return
				}
				console.log(this.isnocondition)
				if(!this.isnocondition){
					uni.showToast({
						title:'选择商品必须大于2.2倍！',
						icon:'none'
					})
					return false
				}
				if(this.OldStuff_list.length > 0){
					if(this.z_new_price > 50){
						if(this.LogisticsNum == ''){
							uni.showToast({
								title:'请填写物流单号',
								icon:'none'
							})
							return false
						}
						if(this.QualificationsImgList == 0){
							uni.showToast({
								title:'请填上传旧物照片',
								icon:'none'
							})
							return false
						}
					}
				}
				this.tiaodong = true
			},
			zhifu_jx(num){
				this.tiaodong = false
				if(num==1){
					return false
				}
				
				this.tj_order()
			},
			//提示完执行这里
			tj_order(){
				let address_id = this.default_address.id;
				let order_type 
				if(this.old_img.length <= 0 && this.OldStuff_list.length <= 0){
					order_type = 0
				}
				if(this.old_img.length <= 0 && this.OldStuff_list.length > 0){
					order_type  = 1
				}
				if(this.old_img.length > 0){
					order_type  = 2
				}
				
				let data = {
						lists: [],
						gift:this.OldStuff_list,
						order_type:order_type,
						tracking_number:this.LogisticsNum,
						address_id: address_id,
						QualificationsImgList: this.QualificationsImgList.join(','),
						images:this.old_img,
						act:{
							act_available_time:this.goodsact.available_time,
							amount_withdrawal:this.goodsact.min_money,
						},
						coupon_id:this.couponinfo.id?this.couponinfo.id:'',
						real_store_id:this.storeinfo.id?this.storeinfo.id:'',
						remarks:this.user_remark,
						is_score:this.checked?1:0,
						pointsinfo:this.pointsinfo,
						offline_order:this.checked1?1:0,
						invoice_id:this.fapiao_obj?this.fapiao_obj.id:''
						
				}
				for(let item of this.buyPro){
					for(let item1 of item.products){
						let data_new = {
							goods_id: item1.id,
							number: item1.number,
							sku_id: item1.sku.id,
							freight_id: item1.freight_id,
							platform: item.platform,
							shop_id:item1.shop_id || '',
						}
						data.lists.push(data_new)
					}
				}
				console.log(data)
				// return false
				this.$api.post({
					url: '/wanlshop/order/addOrder',
					data: {
						order:data,
						// flag:0,
						token: this.token1
					},
					loadingTip: '提交订单中...',
					success: res => {
						console.log(res)
						if(res.code != 1){
							uni.showToast({
								title:res.msg,
								icon:'none'
							})
							return false
						}
						
						this.order_list = res.data.list
						this.token = res.data.token
						console.log(this.$store.state.statistics.order.pay)
						this.$store.commit('statistics/order', {
							pay: this.$store.state.statistics.order.pay + res.data.list.length,
							whole: this.$store.state.statistics.order.whole + res.data.list.length
						});
						// 如果使用优惠券全局减去
						let coupon =  Object.keys(this.couponData).length;
						if (coupon != 0) {
							this.$store.commit('statistics/dynamic', {
								coupon: this.$store.state.statistics.dynamic.coupon - coupon
							});
						}
						// 大厂软件，就是这么迷幻
						if (this.cartType == 'cart') {
							this.$store.dispatch('cart/del');
						}
						if(this.old_img.length > 0){
							uni.showToast({
								title:'您的订单已提交审核',
								icon:'none'
							})
							setTimeout(()=>{
								uni.redirectTo({
									url:'/pages/UserCenter/MyOrders/MyOrders'
								})
							},1500)
							return false
						}
						let  sum = 0,order_ids = [];
						if (res.data.list.length <= 1) {
							console.log('今这里了')
							this.price = res.data.list[0].price;
							this.order_type = res.data.list[0].type;
							this.order_no = `${res.data.list[0].type == 'groups' ? '拼团':''}订单号：${res.data.list[0].order_no}`;
							this.order_pay_no = res.data.list[0].pay_no;
							this.order_id = res.data.list[0].order_id;
						}else{
							console.log('今else里了')
							res.data.list.forEach(item => {
								sum = this.$wanlshop.bcadd(sum, item.price);
								order_ids.push(item.order_id);
							});
							this.price = sum;
							this.order_id = order_ids;
							this.payNum = res.data.list.length;
							this.order_no = '合并支付 ' + res.data.list.length + '个订单';
						}
						
						console.log(this.payNum,'-----')
						this.show = true
					}
				});
				console.log(data)
				if (this.is_combination) {
					this.reasonIndex = this.reasonIndex == 0 ? 1 : this.reasonIndex
				}
				console.log(this.reasonIndex)
				
			},
			// 获取满减
			getFullMinus() {
				this.$get({
					url: '/zhihuan/order_price_discount',
					data: {
						order_price: this.pay_money
					}
				}).then(res => {
					this.more_pay = res.data.more_pay
					this.discount = res.data.discount
					this.priceShow = true
				})
			},
			// 优惠券
			toCoupon() {
				console.log(this.buyPro)
				let shop_ids = []
				for(let item of this.buyPro){
					shop_ids.push(item.shop_id)
				}
				shop_ids = shop_ids.join(',')
				uni.navigateTo({
					url: '/pages/UserCenter/Coupon/Coupon?g_id=' + this.ids + '&isChoose=1&price=' + this.pay_money+'&shop_ids='+shop_ids
				})
			},
			// 线下门店
			toStore() {
				uni.navigateTo({
					url: '/pages/UserCenter/Store/Store'
				})
			},
			// // 获取运费
			// getFees() {
			// 	let pro_city = this.default_address.address.split(' ')[0] + ' ' + this.default_address.address.split(' ')[
			// 		1]
			// 	this.$get({
			// 		url: '/mainwxapp/doPageGetFreight',
			// 		data: {
			// 			buydata: JSON.stringify(this.buydata),
			// 			pro_city
			// 		}
			// 	}).then(res => {
			// 		this.all_freight_price = res.data.data.all_freight_price
			// 	})
			// },
			// // 获取默认地址
			// getaddress() {
			// 	this.$get({
			// 		url: '/order/doPageGetAddress',
			// 		data: {
			// 			suid: uni.getStorageSync('id')
			// 		}
			// 	}).then(res => {
			// 		if (res.data.data.default_address) {
			// 			this.default_address = res.data.data.default_address
			// 		}
			// 	})
			// },
			// getInfo() {
			// 	this.$get({
			// 		url: '/MainWxapp/getBuyGoodsInfo',
			// 		data: {
			// 			buydata: JSON.stringify(this.buydata)
			// 		}
			// 	}).then(res => {
			// 		var isd = this.buyPro = res.data.buyPro
			// 		for (var i in isd) {
			// 			this.ids += (this.ids == '' ? '' : ',') + isd[i].id;
			// 		}
			// 		this.total_price = res.data.total_price
			// 		this.danjia = res.data.total_price
			// 		this.total_num = res.data.total_num
			// 	})
			// },
			chooseAddress() {
				uni.navigateTo({
					url: '/pages/UserCenter/MyAddress/MyAddress?isChoose=1'
				})
			},
			valChange(e,price) {
				console.log(price)
				console.log('当前值为: ' + e.value)
				this.total_price = price * e.value
			},
			// switch打开或者关闭时触发，值为true或者false
			// 即使不监听此事件，this.checked此时也会相应的变成true或者false
			change(status) {


			},
			//订单状态文字和颜色
			orderStateExp(state) {
				let stateTip = '',
					stateTipColor = '#333';
				switch (+state) {
					case 1:
						stateTip = '等待支付';
						stateTipColor = '#f40';
						break;
					case 2:
						stateTip = '等待卖家发货';
						break;
					case 3:
						stateTip = '卖家已发货';
						break;
					case 4:
						stateTip = '交易成功';
						break;
					case 5:
						stateTip = '交易成功';
						break;
					case 6:
						stateTip = '已完成';
						break;
					case 7:
						stateTip = '订单已关闭';
						stateTipColor = '#777';
						break;
					//更多自定义
				}
				return {
					stateTip,
					stateTipColor
				};
			},
			// 改变支付方式
			changeReason(item,index) {
				console.log(item,index)
				if (this.is_combination && index == 0) return;
				this.reasonIndex = index
			},
			// 支付成功
			paySuccess(){
				if(this.order_type === 'goods'){
					this.$store.commit('statistics/order', {
						pay: this.$wanlshop.bcsub(this.$store.state.statistics.order.pay, this.payNum),
						delive: this.$wanlshop.bcadd(this.$store.state.statistics.order.delive, this.payNum)
					});
				}
				this.show = false
				this.last_popup = true
			},
			go_dingdan(){
				this.last_popup = false
				uni.redirectTo({
					url: '/pages/UserCenter/MyOrders/MyOrders'
				})
			},
			// 提交订单
			subOrder() {
				if (!this.default_address) return this.$u.toast('请选择收货地址');
				if (this.checked1 && !this.storeinfo) return this.$u.toast('请选择实体门店');
				if (!this.reasonIndex) {
					var pay_type = 1;
					var pay_to = 0;
				} else { 
					var pay_type = 2;
					var pay_to = this.reasonIndex;
				}
				let data ={
					type:this.payTypes[this.reasonIndex].type,
					method:'app'
				}
				this.wanlPay(data);
			},
			async wanlPay(data, code = null){
				this.$api.post({
					url: '/wanlshop/pay/payment',
					data: {
						order_type: this.order_list[0].type,
						type: data.type,
						method: data.method,
						code: code,
						order_id: this.order_list[0].order_id,
						token: this.token
					},
					success: res => {
						console.log(res)
						if(res.code != 1){
							uni.showToast({
								title:res.msg,
								icon:'none'
							})
							return false
						}
						// 余额支付/小程序支付
						switch (data.type) {
						    case 'balance':
							console.log(this.$store.state.user.money, this.price)
						        this.$store.commit('user/setUserInfo', {
						        	money: this.$wanlshop.bcsub(this.$store.state.user.money, this.price)
						        });
						        this.paySuccess();
						        break;
						    case 'wechat':
								// 微信 H5支付
						        if(data.method == 'wap'){
						        	setTimeout(() => {
						        		uni.showModal({
						        		    content: '请确认微信支付是否已完成',
						        			confirmText: '已完成',
						        			cancelText: '重新支付',
						        		    success: response=> {
						        		        if (response.confirm) {
						        		            this.paySuccess();
						        		        } else if (response.cancel) {
						        		            this.confirm();
						        		        }
						        		    }
						        		});
						        	}, 2000);
						        	// 异步查询是否支付成功
						        	window.location.href = res;
								// 微信 APP支付
								}else if(data.method == 'app'){
									uni.requestPayment({
									    provider: 'wxpay',
									    orderInfo: res.data,
									    success: (e) => {
									        console.log("success", e);
									        this.paySuccess();
									    },
									    fail: (e) => {
									        uni.showModal({
									            content: "支付失败,原因为: " + e.errMsg,
									            showCancel: false
									        })
									    },
									    complete: () => {
											// this.disabled = false;
									    }
									})
								// 微信 小程序支付
						        }else if(data.method == 'miniapp'){
									uni.requestPayment({
									    appId: res.appId,
									    nonceStr: res.nonceStr,
									    package: res.package,
									    paySign: res.paySign,
										signType: res.signType,
										timeStamp: res.timeStamp,
									    success: (e) => {
									        this.paySuccess();
									    },
									    fail: (e) => {
									        uni.showModal({
									            content: "支付失败,原因为: " + e.errMsg,
									            showCancel: false
									        })
									    }
									})
								// 微信 公众平台支付
								}else if(data.method == 'mp'){
									this.$jssdk.wxpay({
										data: res,
										success: e => {
											this.paySuccess();
										},
										fail: err => {
											if (err.errMsg == "chooseWXPay:ok") {
												this.$wanlshop.msg('支付成功');
											}else if (err.errMsg == "chooseWXPay:cancel") {
												this.$wanlshop.msg('支付失败，取消支付');
											}else if (err.errMsg == "chooseWXPay:fail") {
												this.$wanlshop.msg('支付失败');
											}
										}
									})
								}
						        break;
						    case 'alipay':
						        if(data.method == 'wap'){
									// this.disabled = false;
									if(this.order_type === 'goods'){
										this.$store.commit('statistics/order', {
											pay: this.$wanlshop.bcsub(this.$store.state.statistics.order.pay, this.payNum),
											delive: this.$wanlshop.bcadd(this.$store.state.statistics.order.delive, this.payNum)
										});
									}
									document.write(res);
								}else if(data.method == 'app'){
									// console.log(res,'zhifubaozhifu ')
									// return
									uni.requestPayment({
									    provider: 'alipay',
									    orderInfo: res.data,
									    success: (e) => {
									        console.log("success", e);
									        this.paySuccess();
									    },
									    fail: (e) => {
									        uni.showModal({
									            content: "支付失败,原因为: " + e.errMsg,
									            showCancel: false
									        })
									    },
									    complete: () => {
											// this.disabled = false;
									    }
									})
								}
								break;
						} 
					}
				});
			},
			
			// 支付回调(提交订单 支付成功后调用)
			afterPay(order_id, pay_to) {
				// pay_to  0 余额 1 微信 2支付宝
				this.$get({
					url: '/Wxapps/payCallBackNotify',
					data: {
						order_id,
						payprice: this.pay_money,
						types: 'mainShop',
						flag: 0,
						fxsid: 0,
						source: 1,
						pay_to
					}
				}).then(res => {
					uni.showToast({
						title: res.msg,
						mask: true
					})
					setTimeout(() => {
						console.log('+++')
						uni.redirectTo({
							url: '/pages/UserCenter/MyOrders/MyOrders'
						})
					}, 1500)
				})
			}
		}
	}
</script>

<style>
	.flex{
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 20rpx;
	}
	.ma20{
		margin-top: 20rpx;
	}
	page {
		background-color: #F4F4F4;
		padding-bottom: 150rpx;
	}
	.yue{
		font-size: 20rpx;
		color: #999999;
	}
.wlIcon-balance-pay {
	color: #fe8e2e;
}
	.common_bg {
		position: fixed;
		left: 0;
		top: 0;
		width: 100vw;
		height: 284rpx;
	}

	.cou-item {
		padding: 0 20rpx;
		font-size: 24rpx;
		font-family: Alibaba;
		color: #FA360A;
		height: 54rpx;
	}

	.buy-btn {
		width: 192rpx;
		height: 68rpx;
		background: #FA360A;
		box-shadow: 0rpx 6rpx 3r2px 2rpx rgba(250, 74, 20, 0.58);
		border-radius: 34rpx;
		font-size: 26rpx;
		font-family: Alibaba;
		color: #FFFFFF;
		margin-left: 14rpx;
	}

	.reason-item {
		padding: 24rpx 0;
		color: #000000;
		font-size: 28rpx;
		font-family: Alibaba;
	}

	.sure-btn {
		width: 686rpx;
		height: 100rpx;
		background: linear-gradient(246deg, #FA360A 0%, #FA8C0A 100%);
		box-shadow: 0rpx 6rpx 32rpx 2rpx rgba(250, 74, 20, 0.58);
		border-radius: 50rpx;
		font-size: 32rpx;
		font-family: Alibaba;
		color: #FFFFFF;
		margin: auto;
		margin-top: 118rpx;
		margin-bottom: 30rpx;
	}


	@-webkit-keyframes rubberBand {
		from {
			-webkit-transform: scale3d(1, 1, 1);
			transform: scale3d(1, 1, 1);
		}

		30% {
			-webkit-transform: scale3d(1.25, 0.75, 1);
			transform: scale3d(1.25, 0.75, 1);
		}

		40% {
			-webkit-transform: scale3d(0.75, 1.25, 1);
			transform: scale3d(0.75, 1.25, 1);
		}

		50% {
			-webkit-transform: scale3d(1.15, 0.85, 1);
			transform: scale3d(1.15, 0.85, 1);
		}

		65% {
			-webkit-transform: scale3d(0.95, 1.05, 1);
			transform: scale3d(0.95, 1.05, 1);
		}

		75% {
			-webkit-transform: scale3d(1.05, 0.95, 1);
			transform: scale3d(1.05, 0.95, 1);
		}

		to {
			-webkit-transform: scale3d(1, 1, 1);
			transform: scale3d(1, 1, 1);
		}
	}

	@keyframes rubberBand {
		from {
			-webkit-transform: scale3d(1, 1, 1);
			transform: scale3d(1, 1, 1);
		}

		30% {
			-webkit-transform: scale3d(1.25, 0.75, 1);
			transform: scale3d(1.25, 0.75, 1);
		}

		40% {
			-webkit-transform: scale3d(0.75, 1.25, 1);
			transform: scale3d(0.75, 1.25, 1);
		}

		50% {
			-webkit-transform: scale3d(1.15, 0.85, 1);
			transform: scale3d(1.15, 0.85, 1);
		}

		65% {
			-webkit-transform: scale3d(0.95, 1.05, 1);
			transform: scale3d(0.95, 1.05, 1);
		}

		75% {
			-webkit-transform: scale3d(1.05, 0.95, 1);
			transform: scale3d(1.05, 0.95, 1);
		}

		to {
			-webkit-transform: scale3d(1, 1, 1);
			transform: scale3d(1, 1, 1);
		}
	}

	.rubberBand {
		-webkit-animation-name: rubberBand;
		animation-name: rubberBand;
	}

	.animated {
		-webkit-animation-duration: 1s;
		animation-duration: 1s;
		-webkit-animation-fill-mode: both;
		animation-fill-mode: both;
		animation-iteration-count: infinite;
	}

	.pup-btn {
		border: 1rpx solid #FA360A;
		border-radius: 30rpx;
		padding: 10rpx 20rpx;
	}

	.list-item-top {
		display: flex;
		align-items: center;
	}

	.list-item-top-icon {
		width: 30rpx;
		height: 30rpx;
		border-radius: 50%;
		background-color: #000000;
		margin-right: 6rpx;
	}

	.margin20 {
		margin-top: 18rpx;
	}

	.guige {
		/* width: 178rpx; */
		height: 44rpx;
		line-height: 44rpx;
		padding: 0 10rpx;
		box-sizing: border-box;
		background: #F4F4F4;
		border-radius: 22rpx;
		font-size: 20rpx;
		
	}

	/deep/.u-icon-minus {
		width: 41rpx;
		height: 42rpx !important;
		border-radius: 4rpx 0rpx 0rpx 4rpx;
		opacity: 1;
		border: 2rpx solid #F3F3F3;
		font-size: 16rpx !important;
		background-color: #fff !important;
	}

	/deep/.u-icon-plus {
		width: 41rpx;
		height: 42rpx !important;
		border-radius: 4rpx 0rpx 0rpx 4rpx;
		opacity: 1;
		border: 2rpx solid #F3F3F3;
		background-color: #fff !important;
		font-size: 16rpx !important;
		margin: 0 !important;
	}

	/deep/.u-numberbox {
		/* border: 2rpx solid #F3F3F3 !important; */
		height: 42rpx !important;
	}

	/deep/.u-number-input {
		width: 42rpx !important;
		height: 40rpx !important;
		opacity: 1 !important;
		border: 1rpx solid #F3F3F3 !important;
		background-color: #fff !important;
		margin: 0 !important;
	}

	.jiuwudi {
		width: 100%;
		height: 92rpx;
		background: #FFFFFF;
		margin-top: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 32rpx;
	}

	.jiuwudi_left {
		font-size: 26rpx;
		font-family: Alibaba PuHuiTi-Regular, Alibaba PuHuiTi;
		font-weight: 400;
		color: #333333;
	}

	.jiuwudi_right_icon {
		font-size: 20rpx;
		color: #000;
		margin-left: 12rpx;
	}

	.jiuwudi_right {
		font-size: 24rpx;
		font-family: Alibaba PuHuiTi 2.0-55 Regular, Alibaba PuHuiTi 20;
		font-weight: normal;
		color: #888888;
	}

	.jiuwu-list {
		width: 100%;
		/* height: 514rpx; */
		background: #FFFFFF;
		padding: 0 32rpx 28rpx 32rpx;
		box-sizing: border-box;
		margin-top: 20rpx;
	}

	.jiuwu-list-top {
		width: 100%;
		height: 92rpx;
		background: #FFFFFF;
		margin-top: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.jiuwu-list-view{
		margin-top: -20rpx;
	}
	.jiuwu-list-view-item:last-child {
		border-bottom: #F4F4F4 solid 0rpx;
	}

	.jiuwu-list-view-item {
		/* height: 200rpx; */
		border-bottom: #F4F4F4 solid 2rpx;
		/* padding-top: 20rpx; */
		box-sizing: border-box;
	}

	.jiuwu-list-view-item-top {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 24rpx;
		font-family: Alibaba PuHuiTi 2.0-55 Regular, Alibaba PuHuiTi 20;
		font-weight: normal;
		color: #666666;
	}

	.jiuwu-list-view-item-min-left {
		min-width: 116rpx;
		width: 116rpx;
		height: 116rpx;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		opacity: 1;
		border: 2rpx solid #F4F4F4;
		margin-right: 20rpx;
		margin-top: 20rpx;
	}

	.jiuwu-list-view-item-min {
		display: flex;
		/* justify-content: space-between; */
		align-items: center;
		/* margin-top: 12rpx; */
		flex-wrap: wrap;
	}

	.jiuwu-list-view-item-min-right {
		width: 100%;
	}

	.jiuwu-list-view-item-min-right-bottom {
		font-size: 24rpx;
		font-family: Alibaba PuHuiTi 2.0-65 Medium, Alibaba PuHuiTi 20;
		font-weight: normal;
		color: #E32D1D;
		margin-top: 12rpx;
	}

	.jiuwu-list-view-item-min-right-bottom-num {
		font-size: 32rpx;
	}

	.shangjiainfo {
		width: 100%;
		/* padding:30rpx; */
		background: #FFFFFF;
		margin-top: 20rpx;
	}

	.shangjiainfo_danhao {
		height: 92rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 32rpx;
		box-sizing: border-box;
		border-bottom: #F4F4F4 2rpx solid;
	}

	.shangjiainfo_danhao_left {
		font-size: 26rpx;
		font-family: Alibaba PuHuiTi-Regular, Alibaba PuHuiTi;
		font-weight: 400;
		color: #333333;
	}

	.bitian {
		color: #E32D1D;
	}

	.shangjiainfo_danhao_right::placeholder {
		color: #888888;
	}

	.shangjiainfo_danhao_right {
		height: 100%;
		width: 76%;
		font-size: 24rpx;
		font-family: Alibaba PuHuiTi 2.0-55 Regular, Alibaba PuHuiTi 20;
		font-weight: normal;
		color: #333333;
	}

	.shangjiainfo_bottom {
		padding: 0 32rpx 32rpx 32rpx;
	}

	.shangjiainfo_bottom_title {
		font-size: 26rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #000000;
		margin-top: 32rpx;
	}

	.shangjiainfo_bottom_addscce {
		max-width: 600rpx;
		font-size: 26rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;
		
	}

	.shangjiainfo_bottom_flex {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: 20rpx;
		font-size: 24rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;
	}

	.shangjiainfo_bottom_flex_right {
		color: #E32D1D;
	}

	.quxiao {
		width: 548rpx;
		height: 396rpx;
		background: #FFFFFF;
		border-radius: 32rpx;
		position: relative;
	}

	.quxiao_title {
		font-size: 36rpx;
		font-family: Alibaba PuHuiTi 2.0-65 Medium, Alibaba PuHuiTi 20;
		font-weight: normal;
		color: #000000;
		padding-top: 42rpx;
		text-align: center;
	}

	.quxiao_content {
		font-size: 28rpx;
		font-family: Alibaba PuHuiTi-Regular, Alibaba PuHuiTi;
		font-weight: 400;
		color: #666666;
		padding: 0 42rpx;
		margin-top: 20rpx;
		text-align: center;
	}
	.quxiao_content1 {
		font-size: 28rpx;
		font-family: Alibaba PuHuiTi-Regular, Alibaba PuHuiTi;
		font-weight: 400;
		color: #FA360A;
		padding: 0 42rpx;
		margin-top: 20rpx;
		text-align: center;
	}
	.quxiao_content_flex {
		width: 100%;
		position: absolute;
		bottom: 0;
		left: 0;
		display: flex;
		align-items: center;
		border-top: #F4F4F4 solid 2rpx;
		
		
	}
	.quxiao_content_flex1 {
		width: 100%;
		position: absolute;
		bottom: 0;
		left: 0;
		border-top: #F4F4F4 solid 2rpx;
		height: 92rpx;
		line-height: 92rpx;
		text-align: center;
		font-size: 28rpx;
		font-family: Alibaba PuHuiTi 2.0-55 Regular, Alibaba PuHuiTi 20;
		font-weight: normal;
		color: #FA360A;
		
		
	}

	.quxiao_btn {
		width: 50%;
		height: 92rpx;
		line-height: 92rpx;
		text-align: center;
		font-size: 28rpx;
		font-family: Alibaba PuHuiTi 2.0-55 Regular, Alibaba PuHuiTi 20;
		font-weight: normal;
	}

	.quxiao_content_flex_btn {
		color: #666666;
	}

	.quxiao_content_flex_left {
		color: #666666;
		border-right: #F4F4F4 solid 2rpx;
	}

	.quxiao_content_flex_right {
		color: #FA360A;
	}
	.quxiao1{
		width: 548rpx;
		height: 156rpx;
		background: #FFFFFF;
		border-radius: 32rpx;
		position: relative;
	}
	@-webkit-keyframes rubberBand11 {
		from {
			-webkit-transform: scale3d(1, 1, 1);
			transform: scale3d(1, 1, 1);
		}
	
		30% {
			-webkit-transform: scale3d(1.25, 0.75, 1);
			transform: scale3d(1.25, 0.75, 1);
		}
	
		40% {
			-webkit-transform: scale3d(0.75, 1.25, 1);
			transform: scale3d(0.75, 1.25, 1);
		}
	
		50% {
			-webkit-transform: scale3d(1.15, 0.85, 1);
			transform: scale3d(1.15, 0.85, 1);
		}
	
		65% {
			-webkit-transform: scale3d(0.95, 1.05, 1);
			transform: scale3d(0.95, 1.05, 1);
		}
	
		75% {
			-webkit-transform: scale3d(1.05, 0.95, 1);
			transform: scale3d(1.05, 0.95, 1);
		}
	
		to {
			-webkit-transform: scale3d(1, 1, 1);
			transform: scale3d(1, 1, 1);
		}
	}
	
	
	
	.rubberBand11 {
		-webkit-animation-name: rubberBand11;
		animation-name: rubberBand11;
	}
	
	.animated11 {
		-webkit-animation-duration: 2s;
		animation-duration: 2s;
		-webkit-animation-fill-mode: both;
		animation-fill-mode: both;
		animation-iteration-count: infinite;
	}
	
	
	.faren {
		width: 100%;
		background-color: #fff;
		box-sizing: border-box;
	}
	.faren_title {
		width: 100%;
	}
	.faren_flex {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		justify-content: space-between;
	}
	.faren_flex_item {
		position: relative;
	}
	.faren_flex_item_title {
		font-size: 24rpx;
		font-family: Alibaba PuHuiTi 2-65 Medium, Alibaba PuHuiTi 20;
		font-weight: bold;
		color: #000000;
		margin-top: 20rpx;
	}
	.faren_flex_right {
		font-size: 22rpx;
		font-family: Alibaba PuHuiTi 2-65 Medium, Alibaba PuHuiTi 20;
		font-weight: normal;
		color: #000000;
		margin-top: 20rpx;
	}
	.close-circle-fill {
		font-size: 40rpx;
		position: absolute;
		top: 0;
		right: -20rpx;
		color: #fa360a;
	}
	.choose_img_icon {
		width: 64rpx;
		height: 64rpx;
		display: block;
		margin: 0 auto;
		position: relative;
		top: 44rpx;
	}
	.choose_img {
		width: 290rpx;
		height: 194rpx;
		background: #eeeeee;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin-top: 20rpx;
	}
	.choose_img_view {
		width: 290rpx;
		height: 194rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
	.choose_img_desc {
		text-align: center;
		margin-top: 54rpx;
		font-size: 22rpx;
		font-family: Source Han Sans CN-Medium, Source Han Sans CN;
		font-weight: 500;
		color: #959595;
	}
</style>